package com.itcpeng.dao;

import com.github.pagehelper.Page;
import com.itcpeng.pojo.Permission;
import com.itcpeng.pojo.User;

import java.util.Set;

public interface PermissionDao {


    //根据用户名查询User
    User findUserByUsername(String username);


    //根据角色id查询相应的权限
    Set<Permission> findByRoleId(Integer id);


   //获得分页数据对象
    Page<Permission> findPage(String queryString);

    void add(Permission permission);

    int findCountByPermissionId(Integer id);

    void deleteById(Integer id);

    void editById(Permission permission);

    Permission findById(Integer id);
}
